package com.dms.modules.product.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.List;

@Data
@ApiModel(value = "商品规格模板DTO", description = "用于创建和更新商品规格模板的数据传输对象")
public class ProductSpecDTO {

    @ApiModelProperty("模板ID，更新时必填")
    private Long id;

    @ApiModelProperty(value = "商家ID（只读字段，由系统根据当前登录用户自动设置）", readOnly = true)
    private Long merchantId;

    @ApiModelProperty("分类ID")
    @NotNull(message = "分类ID不能为空")
    private Long categoryId;

    @ApiModelProperty("规格名称")
    @NotBlank(message = "规格名称不能为空")
    @Size(max = 50, message = "规格名称长度不能超过50个字符")
    private String name;

    @ApiModelProperty("规格值列表")
    @NotNull(message = "规格值不能为空")
    private List<String> values;

    @ApiModelProperty("排序")
    private Integer sort = 0;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("是否删除：0-未删除，1-已删除")
    private Boolean deleted = false;
} 